import ASC from '/app_settings_core'
import { initApis } from './reserved/http/apis'
import { initMock } from './reserved/http/mock'

// 有坑：样式的引入需要放在前面
import './index.scss'
import ElementPlus from 'element-plus'
import zhCN from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './reserved/router'

await ASC.loadBefore()

const app = createApp(App)
app.use(ElementPlus, { locale: zhCN })
app.use(createPinia())
app.use(router)

await ASC.loadBeforeMount(app)

app.mount('#app')

await ASC.loadAfter(app)

initApis()
initMock()
